﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class StepReminder : MonoBehaviour
{
    private StepManager m_stepMan;
 
    public Text m_lblStepInfo;
    //public UILabel m_lblTipInfo;

    int step = 0;

    void Start()
    {
        m_stepMan = this.GetComponent<StepManager>();
        m_stepMan.StepRemin = StepRemin;
    }

    //步骤操作内容提示
    public void StepRemin()
    {
        string stepInfo;
        string tipInfo = "";
        step = m_stepMan.m_curStep;

        switch (step)
        {
            case 0:
                stepInfo = "1.操作员乙点击车厢门，开门";
                tipInfo = "操作员乙用鼠标左键分别点击加油车车厢的三扇车门，打开车厢门";
                break;

            case 1:
                stepInfo = "2.司机档位和刹车到位后”，点击离合踩下，点击点火开关";
                tipInfo = "点击“司机”窗口，切换到司机操作，点击“确认”按钮，然后点击右方的“离合滑块”开关到“踩住”状态，之后点击方向盘下方的“点火开关”（带绿色高光提示）";
                break;

            case 2:
                stepInfo = "3.司机点击离合踩下，点击打开取力器";
                tipInfo = "司机点火后会显示压力表界面，当指针为为0.6Mpa时，点击“取力器”开关（带绿色高光提示)";
                break;         
            default:
                stepInfo = step.ToString();
                tipInfo = "";
                break;
        }
        if (m_lblStepInfo != null)
        {
            m_lblStepInfo.text = stepInfo;
        }

        //if (m_lblTipInfo != null)
        //{
        //    m_lblTipInfo.text = tipInfo;
        //}
    }
}
